/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package cc;

/**
 *
 * @author hcc25_000
 */
public class Sample2 extends Sample1{
    
    /*@Override
    public void method1(){
        System.out.println("this is child sample1");
    }
    
    public void sample2(){
        System.out.println("this is child sample2");
    }
    
    public static void main(String[] args){
        Sample1 s=new Sample2();
        s.method1();
    }*/
    public void sample1(){
        System.out.println("this is child sample1");
    }
    
    public void sample2(){
        System.out.println("this is child sample2");
    }
    
    public Sample2 getSample2(){
        return this;
    }
    public static void main(String[] args){
      Sample2 s=(Sample2)new Sample1();
    }
}
